class CreateAddresses < ActiveRecord::Migration
  def self.up
    create_table :addresses do |t|
      t.references :user
      t.integer    :provine_id,:limit=>2
      t.integer    :city_id,:limit=>2
      t.integer    :region_id,:limit=>2
      t.string     :street
      t.string     :post_code,:limit=>6
      t.string     :long_distance_code,:limit=>4
      t.string     :tel
      t.string     :mobile
      t.integer    :timing,:limit=>1,:unsigned => true
      t.string     :receiver
      t.timestamps
    end
  end

  def self.down
    drop_table :addresses
  end
end
